#include <iostream>
#include <algorithm>
#include <string>
#include <cstdio>
#include <vector>
using namespace std;
class Solution
{
public:
    vector<int> slice;
    vector<vector<int>> ans;
    void dfs(int cur, int cnt, int n, int k)
    {
        if (cnt == k)
        {
            ans.push_back(slice);
            return;
        }
        for (int i = cur; i <= n; ++i)
        {
            slice.push_back(i);
            dfs(i + 1, cnt + 1, n, k);
            slice.pop_back();
        }
    }
    vector<vector<int>> combine(int n, int k)
    {
        dfs(1, 0, n, k);
        return ans;
    }
};